#pragma once
#include "stdafx.h"

#ifdef PLUGINICPROCSTEPS_EXPORTS
#define PLUGINICPROCSTEPS_API __declspec(dllexport)
#else
#define PLUGINICPROCSTEPS_API __declspec(dllimport)
#endif

#include "procparamdef.h"
#include "procparam.h"
#include "IPluginICProcStepsParamString.h"

class PLUGINICPROCSTEPS_API ProcParamString :	public ProcParam, IPluginICProcStepsParamString
{
public:
	static const char * const ProcParamString::BadValue;
public:
	ProcParamString(int Index, const char *Name, IPluginICProcStepsParam::Direction dir, const char *Value);
	ProcParamString(const ProcParamString *param);
	virtual ~ProcParamString(void);
				//IMxPluginBase
	virtual long		MXSTDMETHOD DestroyPtr(void);
	virtual long		MXSTDMETHOD DuplicatePtr(void);
	virtual void *		MXSTDMETHOD Dynamic_cast(const char *IId);
	virtual const char *MXSTDMETHOD GetInterfaceGUID(void)  { return IPluginICProcStepsParamStringIID::GUID(); }
	virtual const char *MXSTDMETHOD GetInterfaceName(void) { return IPluginICProcStepsParamStringIID::Name(); }
				//IPluginICProcStepsParam
	virtual const char *MXSTDMETHOD GetType() { return IPluginICProcStepsParamDefStringP; }
	virtual bool		MXSTDMETHOD IsValid() { return (((ProcParam::IsValid() == true) && (_valStr != ProcParamString::BadValue)) ? true : false); }
	virtual IPluginICProcStepsParam::Direction	MXSTDMETHOD GetDirection() { return ProcParam::GetDirection(); }
	virtual const char *MXSTDMETHOD	GetName() {  return ProcParam::GetName(); }   //return value even if it is invalid
	virtual int			MXSTDMETHOD	GetIndex() { return ProcParam::GetIndex(); }			//return value even if it is invalid, index in the called function's parameter list, NOT position in ProcParams::_Params[pos] 
	virtual const char *MXSTDMETHOD	GetValueStr() { return ProcParam::GetValueStr(); }
				//IPluginICProcStepsParamString
	virtual const char *MXSTDMETHOD GetValue() { return _valStr.c_str(); }						//caller responsible for checking not ProcParamString::BadValue
	virtual void		MXSTDMETHOD SetValue(const char *Val) { _valStr = Val; }


};


//-------------------------------------------------------------------------------------------------
//			E N D   O F   F I L E
//-------------------------------------------------------------------------------------------------
